{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "d8392c8f-74ae-4612-b2fc-a94a8b2ad16b",
   "metadata": {},
   "source": [
    "Chapter 06\n",
    "# 比较运算符\n",
    "Book_1《编程不难》 | 鸢尾花书：从加减乘除到机器学习 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "24ed9226-9179-4b89-9a86-002c104f5bfe",
   "metadata": {},
   "outputs": [],
   "source": [
    "x = 5\n",
    "y = 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "8b56b84e-1edf-4bd7-934d-d5baface282b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "False\n",
      "True\n",
      "True\n",
      "False\n",
      "False\n"
     ]
    }
   ],
   "source": [
    "print(x == y)    # False\n",
    "print(x == 5)    # True\n",
    "print(x != y)    # True\n",
    "print(x != 5)    # False\n",
    "print(x != 5.0)  # False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "3de552a2-f2c8-4d73-9c7e-d4d295a96341",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True\n",
      "False\n",
      "True\n",
      "True\n"
     ]
    }
   ],
   "source": [
    "print(x > y)   # True\n",
    "print(x > 10)  # False\n",
    "print(x >= y)  # True\n",
    "print(x >= 5)  # True"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "2cdde88d-0452-4dfa-92e5-1551f2be7089",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "False\n",
      "True\n",
      "False\n",
      "True\n"
     ]
    }
   ],
   "source": [
    "print(x < y)   # False\n",
    "print(x < 10)  # True\n",
    "print(x <= y)  # False\n",
    "print(x <= 5)  # True"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
